cmake_minimum_required(VERSION 3.22)
project(OpenCOS)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Qt5 COMPONENTS
        Core
        Gui
        Widgets
        REQUIRED)


file(GLOB_RECURSE src_lists
        opencos/item/*
        opencos/order/*
        opencos/customer/*
        opencos/manage_system/*
        opencos/ui/*.ui
        opencos/ui/*.cpp
)

add_executable(${PROJECT_NAME} opencos/main.cpp ${src_lists})

find_package(spdlog CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME}
        spdlog::spdlog
        Qt5::Core
        Qt5::Gui
        Qt5::Widgets
)

find_path(RAPIDCSV_INCLUDE_DIRS "rapidcsv.h")
target_include_directories(${PROJECT_NAME} PRIVATE ${RAPIDCSV_INCLUDE_DIRS})

target_include_directories(${PROJECT_NAME} PRIVATE
        include
        opencos/ui
)
